<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>卖家-修改个人信息</title>
<link href="<?php echo $this->_webroot('/user/css/common.css'); ?>" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->_webroot('/user/css/content1.css'); ?>" rel="stylesheet" type="text/css" />
<script src="<?php echo $this->_webroot('/user/js/jquery-1.7.1.min.js'); ?>" type="text/javascript"></script>
<script src="<?php echo $this->_webroot('/user/js/common.js'); ?>" type="text/javascript"></script>


 
</head>
<body>
<psp:tags     htmlname='user_topnav1'  iconname='usertopnav1' />
<psp:tags     htmlname='user_topsearch'  iconname='usertopsearch' />

<div class="main">
	<div class="main-left">
    	<div class="title">会员管理中心</div>
        <psp:tags     htmlname='user_menulist'  iconname='usermenulist' />
        
    </div>
    
    <div class="main-right">    	       
        <!-- 查看某订单 -->
        <form method="post" action="" class="margin2">
        	<input type="text" name="" class="input1" />
            <input type="button" value="查看某订单" class="look_order" />
        </form>
        <!-- 查看某订单 end -->
        
        <!-- 订单信息主体内容 -->
        <div class="order_main_wrap">
        	<div class="order_main_head">
            	<ul>
                	<li><a href="<?php echo $this->_url('user/usermyorder/?');?>" class="ordermain_head_a selected1">所有订单</a></li>
                    <li><a href="<?php echo $this->_url('user/usermyorder/?state=1');?>" class="ordermain_head_a">未确定</a></li>
                    <li><a href="<?php echo $this->_url('user/usermyorder/?state=2');?>" class="ordermain_head_a">已确定</a></li>
                    <li><a href="<?php echo $this->_url('user/usermyorder/?state=3');?>" class="ordermain_head_a">未支付</a></li>
                    <li><a href="<?php echo $this->_url('user/usermyorder/?state=4');?>" class="ordermain_head_a">已支付</a></li>
                    <li><a href="<?php echo $this->_url('user/usermyorder/?state=5');?>" class="ordermain_head_a">未发货</a></li>
                    <li><a href="<?php echo $this->_url('user/usermyorder/?state=6');?>" class="ordermain_head_a">已发货</a></li>
                    <li><a href="<?php echo $this->_url('user/usermyorder/?state=7');?>" class="ordermain_head_a">已完成</a></li>
                    <li><a href="<?php echo $this->_url('user/usermyorder/?state=8');?>" class="ordermain_head_a">已发货待确认</a></li>
                    <li><a href="<?php echo $this->_url('user/usermyorder/?state=9');?>" class="ordermain_head_a">未评价</a></li>					
                    <div class="clear"></div>
                </ul>     
                <div class="clear"></div>       
            </div>
            <div class="order_main_body">
                
				<style>
.border_l {
border-left: 1px solid #E0E0E0;
background: none repeat scroll 0 0 #FFFFFF;
}

				</style>
                    <table class="goodslist_table">
                        <tr class="goodslist_tr5">
                            <td class="td_first1" width="50">商品图片</td>
                            <td width="80">商品信息</td>
                            <td width="200">订单信息</td>
                            <td width="80">总计</td>
                            <td width="50">状态</td>
                            <td width="60">操作</td>
                            <td width="45"></td>
                        </tr>
                        <tr class="sep_row"><td colspan="7"></td></tr>                        
                        <tr class="goodslist_tr2">
                            <td colspan="9">
                            	<div class="tabOps">
                                <label>
                    <form action="<?php echo $this->_url('user/usermyorder/?');?>" method="get">
					<select name="state">
						<option value='' <?php if($state=="") {echo 'selected'; }?>>全部</option>
						<option value='1' <?php if($state=="1"){echo "selected";}?>>未确定</option>
						<option value='2' <?php if($state=="2"){echo "selected";}?>>已确定</option>
						<option value='3' <?php if($state=="3"){echo "selected";}?>>未支付</option>
						<option value='4' <?php if($state=="4"){echo "selected";}?>>已支付</option>
						<option value='5' <?php if($state=="5"){echo "selected";}?>>未发货</option>
						<option value='6' <?php if($state=="6"){echo "selected";}?>>已发货</option>
						<option value='7' <?php if($state=="7"){echo "selected";}?>>已完成</option>
						<option value='8' <?php if($state=="8"){echo "selected";}?>>已发货待确认</option>
						<option value='9' <?php if($state=="9"){echo "selected";}?>>未评价</option>
					</select>&nbsp;&nbsp;&nbsp;&nbsp;
					<input class="btn_ser" type="submit" value="查询" />&nbsp;&nbsp;&nbsp;&nbsp;
				</form>
                                </label>
                                <!--<a href="" class="choose_a1">批量发货</a>
                                <a href="" class="choose_a1">批量备忘</a>
                                <a href="" class="choose_a1">批量免运费</a>
                                <label class="margin1">
                                    <input type="checkbox" class="input2" /><span class="color1">不显示已关闭的订单</span>
                                </label>-->
                                </div>
                                <div class="goto">
                                	<a href="<?php echo $result['page']['prevPage']; ?>" class="back">上一页</a>
                                    <a href="<?php echo $result['page']['nextPage']; ?>" class="pre">下一页</a>
                                </div>
                            </td>
                        </tr>
						<form method="post" action="" class="">
            <?php if(!empty($result['data'])) {
				foreach($result['data'] as $key =>$v) { ?>                       
                        <tr class="sep_row"><td colspan="7"></td></tr>
                        <tr class="dingdan_hd"><td colspan="7">
                        	<div class="dingdan_snumber" style="width:200px; font-size: 12px;font-weight: none;">订单：<?php echo $v['payid'];?></div>
                            <div class="dingdan_number"> </div>
                            <div class="pro_number">
							<!--商家：<?php echo $v['shop_name'];?><br/>
							下单时间：<?php echo $v['order_time'];?><br/>
							总计：<?php echo $v['order_value'];?>
							状态:-->
							</div>
                            
                            <div class="mai_ops">							  
                              <!--<a href="#"><span>终止交易</span></a>
                              <a href="#"><span>确认收货</span></a>-->
                            </div>
                        </td></tr>
                    <?php $num =count($v['order_goods']); foreach($v['order_goods'] as $k=> $goods){?>    
                        <!--<tr class="sep_row"><td colspan="7"></td></tr>-->
                        <tr <?php if ($k %2 ==0) { ?>class="bgColor2" <?php } else { ?> class="bgColor3"<?php } ?> >
                            <!--<td ><input type="checkbox" class="checkbox1" /><span class="serial_number">1</span></td>-->
                            <td ><a href="<?php echo $this->_url('shop/productshow/'.$goods['og']['goods_id']);?>" class="goods_small_img goods_small_img2"><img src="<?php echo $goods['b']['goods_thumb'];?>" alt="<?php echo $goods['og']['goods_name'];?>" width="82" height="80" /></a></td>
                            <td style="width:150px;"><span class="goods_name_span goods_name_span3" ><a href="<?php echo $this->_url('shop/productshow/'.$goods['og']['goods_id']);?>"><?php echo $goods['og']['goods_name'];?></a></span></td>
            <!-- 合并  -->
            <?php if($k==0){?>
            <td class="border_l" style="width:180px;text-align: left;padding: 5px;" rowspan="<?php echo $num;?>"  >下单时间：<?php echo $v['order_time'];?><br />商家：<?php echo $v['shop_name'];?></td>
             <td class="border_l" rowspan="<?php echo $num;?>"  >￥<?php echo $v['order_value'];?></td>
			  <td class="border_l" rowspan="<?php echo $num;?>" >
            	<?php  if($goods['b']['lock_flg']==1){
            		echo "<span class='black'>此商品已被锁定</span><br />";
            	}else if($v['open_flg']==1){
            		echo "<span class='black'>店铺已被关闭！</span><br />";
            	}else if($v['lock_flg']==1){
            		echo "<span class='black'>店铺已被锁定！</span><br />";
            	}else{
	            	if($v['order_status']==0){
							echo "<span class='black'>订单状态异常</span><br />";
						} elseif($v['protect_status']==1) {
							echo "<span class='red'>维权中</span><br />";
						}elseif($v['protect_status']==2) {
							echo "<span class='red'>同意维权</span><br />";
						} elseif($v['protect_status']==3) {
							echo "<span class='red'>维权结束</span><br />";
						} elseif($v['order_status']==3) {
							echo "<span class='green'>已完成购买</span><br />";
						}else {
							if($v['pay_status']==0) {
								echo "<span class='red'>待付款</span><br /> ";
							} elseif($v['pay_status']==2){
								echo "<span class='red'>待退款</span><br /> ";
							} elseif($v['pay_status']==3){
								echo "<span class='red'>已退款</span><br /> ";
							} elseif($v['pay_status']==4){
								echo "<span class='red'>退款成功</span><br /> ";
							}else {
								if($v['transport_status']) {
									echo "<span class='red'>已发货</span><br /> ";
								} else {
									echo "<span class='red'>待发货</span><br />";
								}
							}	
					}
				}?>
            </td>
            <td  class="border_l" rowspan="<?php echo $num;?>" >
            <?php  if($goods['b']['lock_flg']==1){?>
				<a href="<?php echo $this->_url('user/userorderview/?');?>order_id=<?php echo  $v['id'];?>" title="查看详情">查看详情</a><br />
				<?php if(empty($v['get_back_time'])&&$v['pay_status']==1&&$v['order_status']>0&&$v['order_status']<3&&time()>(strtotime($v['pay_time'])+24*3600)){?>
					<a href="<?php echo $this->_url('user/getbackmoney/?');?>order_id=<?php echo  $v['id'];?>" >退款</a>
				<?php }?>
			<?php  }else if($v['open_flg']==1){?>
					<span class='black'>店铺已被关闭！</span><br />
			<?php  }else if($v['lock_flg']==1){?>
					<span class='black'>"店铺已被锁定！"</span><br />
			<?php }else{?>
				<?php if($v['order_status']==1  && $v['pay_status']==0) {?>
					<a href="<?php echo $this->_url('user/userorderdel/?');?>id=<?php echo  $v['id'];?>" onclick="return confirm('确定要取消该订单吗？');">取消订单</a><br />
					<a href="<?php echo $this->_url('user/paymentmsg/?');?>id=<?php echo  $v['id'];?>">付款</a><br />
				<?php }?>
				<?php if($v['order_status']==1 && $v['pay_status']==1 &&$v['transport_status']==0) {?>
					<a href="<?php echo $this->_url('user/askbackmoney/?');?>id=<?php echo  $v['id'];?>">申请退款</a><br />
				<?php }?>
				<?php if($v['order_status']==1  && $v['pay_status']==3) {?>
					<a href="<?php echo $this->_url('user/surebackmoney/?');?>id=<?php echo  $v['id'];?>">确认退款</a><br />
				<?php }?>
				
				<?php if($v['transport_status']==1 && $v['order_status']==3 && $v['protect_status']==0) {?>
					<a href="<?php echo $this->_url('user/userprotectrights/?');?>order_id=<?php echo  $v['id'];?>">申请维权</a><br />
				<?php }?>
				
				<?php if($v['protect_status']!=0 && $v['protect_status']!=3) {?>
					<a href="<?php echo $this->_url('user/usercancelprotect/?');?>order_id=<?php echo  $v['id'];?>"><font color="red">结束维权</font></a><br />
				<?php }?>
				
				<?php if($v['protect_status']==1 || $v['protect_status']==2) {?>
					<a href="<?php echo $this->_url('user/userprotectrights/?');?>order_id=<?php echo  $v['id'];?>"><font color="red">查看维权</font></a><br />
				<?php }?>
				
				<?php if($v['transport_status']==1 && $v['order_status']==1) {?>
					<a href="<?php echo $this->_url('user/userordercheckget/?');?>order_id=<?php echo  $v['id'];?>"  onclick="return confirm('您购买的商品确认已收到？');">确认收货</a><br />
					申请维权<br />
				<?php }?>
				<a href="<?php echo $this->_url('user/userorderview/?');?>order_id=<?php echo  $v['id'];?>" title="查看订单详情">查看详情</a><br />
				<!-- 订单投诉 开始 -->
				<?php   if($v['pay_status']!=0 && $v['pay_status']!=4 && $v['order_status']!=3) {?>
					<?php   if($v['complaint']==0) {?>
					<a href="<?php echo $this->_url('user/complaint/?');?>order_id=<?php echo  $v['id'];?>" >投诉内容</a><br />
					<?php }else{?>
					已投诉<br />
					<?php }?>
				<?php }?>
				<!-- 订单投诉 结束 -->
				<!-- 订单评价 开始 -->
				<?php if($v['transport_status']==1 && $v['order_status']==3 && $v['buyer_reply']==0) {?>
					<a href="<?php echo $this->_url('usershop/shopcreditadd/?');?>order_id=<?php echo  $v['id'];?>&t=buyer" >评价</a><br />
				<?php }else if($v['transport_status']==1 && $v['order_status']==3 && $v['buyer_reply']==1){?>
					已评价<br />
				<?php }?>
				<!-- 订单评价 结束 -->
			<?php  }?>
			</td>
            <!-- 合并  -->
            <?php }?>               
                        </tr>
					<?php }?>	
                <?php }?>
            <?php }?>                        

                    
                         
                        <tr class="sep_row"><td colspan="7"></td></tr>
                        <tr class="goodslist_tr2">
                            <td colspan="9">
                            	<!--<div class="tabOps">
                                <label>
                                    <input type="checkbox" class="input2" />全选
                                </label>
                                <a href="" class="choose_a1">批量发货</a>
                                <a href="" class="choose_a1">批量备忘</a>
                                <a href="" class="choose_a1">批量免运费</a>
                                <label class="margin1">
                                    <input type="checkbox" class="input2" /><span class="color1">不显示已关闭的订单</span>
                                </label>
                                </div>-->
                                <div class="goto">
                                	<a href="<?php echo $result['page']['prevPage']; ?>" class="back">上一页</a>
                                    <a href="<?php echo $result['page']['nextPage']; ?>" class="pre">下一页</a>								
                                </div>
                            </td>
                        </tr>
                        <tr class="sep_row"><td colspan="9"></td></tr>
						 </form> 
                    </table>
                          
            </div>   
        	<div class="clear"></div>
        </div>
        <!-- 订单信息主体内容 end -->

        <div class="clear"></div>
        
    </div>
    <div class="clear"></div>
</div>


<div class="footer">
    <psp:tags     htmlname='user_footer_helper'  iconname='userfooterhelper' />

</div>
</body>
</html>